package cn.fbs.controller;

import cn.fbs.model.dm.TCollectionUnitinfo;
import cn.fbs.service.CollectionUnitTreeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "采集單位管理")
@RestController
@RequestMapping("collectionUnit")
public class CollectionUnitController {

    @Autowired
  CollectionUnitTreeService collectionUnitTreeService;


    /**
     * @Description: 查询指标全部层级关系
     * @Param: []
     * @return: com.bonc.entity.ResponseEntity
     * @Author: zlj
     * @Date: 2020/12/22
     **/
    @ApiOperation("采集单位全部目标层查询")
    @RequestMapping(value = "getCollectionUnit", method = RequestMethod.GET)
    public List<TCollectionUnitinfo> getCollectionUnit() {
        List<TCollectionUnitinfo> collectionUnitTree = collectionUnitTreeService.getCollectionUnitTree();
         return collectionUnitTree;
    }


}
